#ifndef TAGMASTER_H
#define TAGMASTER_H

#include <QVector>
#include <QString>

#include "ORM/Relation.h"
#include "ORM/Entry.h"

enum TagType : int;

class TagMaster
{
public:
    TagMaster();
    TagMaster(const TagMaster &tagMaster) = delete;
    TagMaster& operator=(const TagMaster &tagMaster) = delete;
    ~TagMaster();

    bool isNull();

    void createNewDocument();
    bool openXmlFile(const QString &path);

    bool save();
    bool saveXmlFileAs(const QString &path);
    QString xmlFileSavePath();
    void setXmlFileSavePath(const QString &path);

    TagList tags();
    RelationList relations();
    Entry entry();


    void clear();


    // void setEntryPath(const QString &path);
    bool setFileTag(const QString &filePath, quint64 fileSize, const QString &qs);


private:
    QString m_xmlSavePath;
    QString m_entryPath;
    QDomDocument m_document;

    QDomElement m_tags;
    QDomElement m_relations;
    QDomElement m_entry;
    QDomElement m_lostAndFound;

};

#endif // TAGMASTER_H
